<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>添加/编辑会员 - Powered By faithby</title>
<meta name="Author" content="faithby Team" />
<meta name="Copyright" content="faithby" />
<link rel="icon" href="favicon.ico" type="image/x-icon" />
<#include "admin/common_css.ftl">
<script type="text/javascript" src="${base}/apache/common/js/jquery.tools.minfull.js"></script>
<script type="text/javascript">
$(function() {

$("#validateForm").validator();
$.tools.validator.fn("[data-equals]", "和密码输入不一致！", function(input) {
    var name = input.attr("data-equals"),
            field = this.getInputs().filter("[name=" + name + "]");
    return input.val() == field.val() ? true : [name];
});

});
</script>
</head>
<body class="input">
	<div class="bar">
		<#if isAddAction>添加会员<#else>编辑会员</#if>
	</div>
	<div id="validateErrorContainer" class="validateErrorContainer">
		<div class="validateErrorTitle">以下信息填写有误,请重新填写</div>
		<ul></ul>
	</div>
	<div class="body">
		<form novalidate id="validateForm" action="<#if isAddAction>save<#else>update</#if>" method="post">
			<input type="hidden" name="id" value="${id}" />
			<table class="inputTable">
				<tr>
					<th>
						用户名: 
					</th>
					<td>
						<#if isAddAction>
							<input type="text" name="username" class="formText" pattern="[a-zA-Z ]{5,}" maxlength="30" required="required" />
						<#else>
							${member.username}
							<input type="hidden" name="username" value="${(member.username)!}" required="required" />
						</#if>
					</td>
				</tr>
				<tr>
					<th>
						用户真实姓名: 
					</th>
					<td>
						<#if isAddAction>
							<input type="text" name="realName" class="formText" required="required" />
						<#else>
							${member.realName}
							<input type="hidden" name="realName" value="${(member.realName)!}" required="required" />
						</#if>
					</td>
				</tr>
				<tr>
					<th>
						密 码: 
					</th>
					<td>
						<input type="password" id="password" name="password" class="formText" required="required"/>
					</td>
				</tr>
				<tr>
					<th>
						确认密码: 
					</th>
					<td>
						<input data-equals="password" type="password" id="rePassword" name="rePassword" class="formText" required="required"/>
					</td>
				</tr>
				<tr>
					<th>
						E-mail: 
					</th>
					<td>
						<input type="email" name="email" class="formText" value="${(member.email)!}" required="required"/>
					</td>
				</tr>
				<tr>
					<th>
						电话: 
					</th>
					<td>
						<input type="number" name="telephone" class="formText" value="${(member.telephone)!}" title="只允许输入零或正整数" required="required"/>
					</td>
				</tr>
				<tr>
					<th>
						密码保护问题: 
					</th>
					<td>
						<input type="text" name="safeQuestion" class="formText" value="${(member.safeQuestion)!}" title="30个字符以内"/>
						<label class="requireField">*</label>
					</td>
				</tr>
				<tr>
					<th>
						密码保护答案: 
					</th>
					<td>
						<input type="text" name="safeAnswer" class="formText" value="${(member.safeAnswer)!}" title="30个字符以内"/>
					    <label class="requireField">*</label>
					</td>
				</tr>
				<tr>
					<th>
						&nbsp;
					</th>
					<td>
						&nbsp;
					</td>
				</tr>
			</table>
			<div class="buttonArea">
				<input type="submit" class="formButton" value="确  定" hidefocus />&nbsp;&nbsp;
				<input type="button" class="formButton" onclick="window.history.back(); return false;" value="返  回" hidefocus />
			</div>
		</form>
	</div>
	

</body>
</html>